package com.android.hdhe.uhf.consts;

public class Constants {

	//包头
	public static final byte HEAD = (byte) (0xA0); 
	//地址
	public static final byte ADDR = (byte) (0x01);
	
	///////////////////////系统设置指令///////////////////////////////
	//读写器重启
	public static final byte CMD_RESET_READER = (byte) (0x70); 
	//设置波特率
	public static final byte CMD_SET_BAUD = (byte) (0x71); 
	//获取固件版本
	public static final byte CMD_GET_FIRMWARE_VERSION = (byte) (0x72); 
	//设置读写器地址
	public static final byte CMD_SET_NEW_ADDRESS = (byte) (0x73); 
	//设置工作天线
	public static final byte CMD_SET_WORK_ANTENNA = (byte) (0x74); 
	//获取当前工作天线
	public static final byte CMD_GET_WORK_ANTENNA = (byte) (0x75); 
	//设置输出功率
	public static final byte CMD_SET_OUTPUT_POWER = (byte) (0x76); 
	//获取当前输出功率
	public static final byte CMD_GET_OUTPUT_POWER = (byte) (0x77);
	//设置射频频谱
	public static final byte CMD_SET_FREQUENCY_REGION = (byte) (0x78); 
	//获取射频频谱
	public static final byte CMD_GET_FREQUENCY_REGION = (byte) (0x79); 
	//设置蜂鸣器模式
	public static final byte CMD_SET_BEEPER_MODE = (byte) (0x7A); 
	//获取读写器温度
	public static final byte CMD_GET_READER_TEMPERATURE = (byte) (0x7B); 
	//设置DRM模式
	public static final byte CMD_SET_DRM_MODE = (byte) (0x7C); 
	//获取DRM模式
	public static final byte CMD_GET_DRM_MODE = (byte) (0x7D); 
	//读GPIO值
	public static final byte CMD_READ_GPIO_VALUE = (byte) (0x60); 
	//写GPIO值
	public static final byte CMD_WRITE_GPIO_VALUE = (byte) (0x61); 
	//设置天线连接检测
	public static final byte CMD_SET_ANT_CONNECTION_DETECTOR = (byte) (0x62); 
	//获取天线连接
	public static final byte CMD_GET_ANT_CONNECTION_DETECTOR = (byte) (0x63);  
	//设置临时输出功率
	public static final byte CMD_SET_TEMPORARY_OUTPUT_POWER = (byte) (0x66); 
	//设置读写器识别字符
	public static final byte CMD_SET_READER_IDENTIFIER = (byte) (0x67); 
	//获取读写器识别字符
	public static final byte CMD_GET_READER_IDENTIFIER = (byte) (0x68); 
	
	
	////////////////////////18000-6C////////////////////////////////////////////
	//盘存
	public static final byte CMD_6C_INVENTORY = (byte) (0x80);
	//读指令
	public static final byte CMD_6C_READ = (byte) (0x81);
	//写指令
	public static final byte CMD_6C_WRITE = (byte) (0x82);
	//锁定标签
	public static final byte CMD_6C_LOCK = (byte) (0x83);
	//灭活标签
	public static final byte CMD_6C_KILL = (byte) (0x84);
	//设置EPC匹配通道
	public static final byte CMD_6C_SET_ACCESS_EPC_MATCH = (byte) (0x85);
	//获取EPC匹配通道
	public static final byte CMD_6C_GET_ACCESS_EPC_MATCH = (byte) (0x86);
	//实时盘存
	public static final byte CMD_6C_REAL_TIME_INVENTORY = (byte) (0x89);
	//快速天线盘存
	public static final byte CMD_6C_FAST_SWITCH_ANT_INVENTORY = (byte) (0x8A);
	
	/////////////////////////ISO18000-6B////////////////////////////////////////
	//盘存ISO18000-6B标签
	public static final byte CMD_ISO18000_6B_INVENTORY = (byte) (0xB0);
	//读ISO18000-6B标签
	public static final byte CMD_ISO18000_6B_READ = (byte) (0xB1);
	//写ISO18000-6B标签
	public static final byte CMD_ISO18000_6B_WRITE = (byte) (0xB2);
	//锁定ISO18000-6B标签
	public static final byte CMD_ISO18000_6B_LOCK = (byte) (0xB3);
	//查询ISO18000-6B标签
	public static final byte CMD_ISO18000_6B_QUERY_LOCK = (byte) (0xB3);
	
	
	//////////////////////////////缓存操作指令//////////////////////////////////////////
	//提取标签数据并删除缓存
	public static final byte CMD_GET_INVENTORY_BUFFER = (byte) (0x90);
	//提取标签数据保留缓存备份
	public static final byte CMD_GET_AND_RESET_INVENTORY_BUFFER = (byte) (0x91);
	//查询缓存中已读标签个数
	public static final byte CMD_GET_INVENTORY_BUFFER_TAG_COUNT = (byte) (0x92);
	//清空标签数据缓存
	public static final byte CMD_RESET_INVENTORY_BUFFER = (byte) (0x93);
	
	
	////////////////////////////错误指令表//////////////////////////////////////////////////
	public static final byte CMD_SUCCESS = (byte) (0x10);//指令成功完成
	public static final byte CMD_FAIL = (byte) (0x11);//指令执行失败
	public static final byte MCU_RESET_ERROR = (byte) (0x20);//读写器复位错误
	public static final byte CW_ON_ERROR = (byte) (0x21);//CW打开失败
	public static final byte ANTENNA_MISSING_ERROR = (byte) (0x22);//天线未连接
	public static final byte WRITE_FLASH_ERROR = (byte) (0x23);//写FLASH错误
	public static final byte READ_FLASH_ERROR = (byte) (0x24);//读FLASH错误
	public static final byte SET_OUTPUT_POWER_ERROR = (byte) (0x25);//设置发射功率错误
	public static final byte TAG_INVENTORY_ERROR = (byte) (0x31);//标签盘存错误
	public static final byte TAG_READ_ERROR = (byte) (0x32);//标签读取错误
	public static final byte TAG_WRITE_ERROR = (byte) (0x33);//写标签错误
	public static final byte TAG_LOCK_ERROR = (byte) (0x34);//锁定标签错误
	public static final byte TAG_KILL_ERROR = (byte) (0x35);//灭活标签错误
	public static final byte NO_TAG_ERROR = (byte) (0x36);//无可操作标签错误
	public static final byte INVENTORY_OK_BUT_ACCESS_FAIL = (byte) (0x37);//成功盘存但访问失败
	public static final byte BUFFER_IS_EMPTY_ERROR = (byte) (0x38);//缓冲为空错误
	public static final byte ACCESS_OR_PASSWORD_ERROR = (byte) (0x40);//访问标签错误或密码错误
	public static final byte PARAMETER_INVAILID = (byte) (0x41);//无效参数
	public static final byte PARAMETER_INVAILED_WORDCNT_TOO_LONG = (byte) (0x42);//WORDcnt长度
	public static final byte PARAMETER_INVAILED_MEMBANK_OUT_OF_RANGE = (byte) (0x43);//MEMBANK参数超出范围
	public static final byte PARAMETER_INVAILED_LOCK_REGION_OUT_OF_RANGE = (byte) (0x36);//lock数据区参数超出范围
	public static final byte PARAMETER_INVAILED_LOCK_ACTION_OUT_OF_RANGE = (byte) (0x36);//lock TYPE参数超出范围
	public static final byte PARAMETER_READER_ADDRESS_INVAILED = (byte) (0x36);//无可操作标签错误
	public static final byte PARAMETER_INVAILED_ATNNEN_ID_OUT_OF_RANGE = (byte) (0x36);//ATNNEN ID 超出范围
	public static final byte PARAMETER_INVAILED_OUTPUT_POWER_OUT_OF_RANGE = (byte) (0x36);//输出功率超出范围
	public static final byte PARAMETER_INVAILED_FREQUENCY_REGION_OUT_OF_RANGE = (byte) (0x36);//射频规范区参数超出范围
	
	
}
